package A经典面试;

import org.junit.Test;

public class Test12 {
    public static void main(String[] args) {
        System.out.println("--------  12 ------------");
        int x= 0;
        int y = 0;
        for(int z= 0; z < 5; z++){
            if((++x > 2) && (++y > 2)){
                x++;
            }
        }
        System.out.println(x + " " + y);

        /**
         * z    0   1   2   3   4
         * x    1   2   3   4   6
         * y    0   0   1   2   3
         */
        System.out.println("x = " + 6);
        System.out.println("y = " + 3);
    }

    @Test
    public void test11(){
        int x = 182;
        int a,c;
        c = x / 100;    // 1
        a = x % 10;     // 2
        System.out.println(a + "  " + c);



    }

    @Test
    public void test7(){
        int x = 1,y=2,z=3;
        System.out.println(y+=z--/++x);

        //猜想 : y = 2 + (3 / 2) = 3

    }


}
